﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MaxLeaf.DB;
using MySql.Data.MySqlClient;
using MaxLeaf.Common;
using System.Data.SqlClient;

namespace MaxLeaf.DAL.K2W
{
    public class t_icItemDeletedDAL : BaseDAL
    {
        
        public  override int Add(DBAccess dbOrgK3Con, DBAccess dbDestWebReadCon, DBAccess dbDestWebWriteCon, string strKeyValue)
        {
            
            return 0;
        }
        public override int Update(DBAccess dbOrgK3Con, DBAccess dbDestWebReadCon, DBAccess dbDestWebWriteCon, string strKeyValue)
        {
            string strSql = "update k3_goods_main set is_disabled=?disabled  where fitemid=?fitemid";
            dbDestWebWriteCon.ExecuteSql(strSql, new System.Data.IDataParameter[] { 
                new MySqlParameter("?disabled",CvtFunc.ToInt(dbOrgK3Con.GetValue("select fdeleted from t_icitem where  fitemid=@fitemid",new System.Data.IDataParameter[] { new SqlParameter("@fitemid",strKeyValue) })))
                ,new MySqlParameter("?fitemid",strKeyValue)
            });
            return 0;
        }
        public override void Delete(DBAccess dbOrgK3Con, DBAccess dbDestWebReadCon, DBAccess dbDestWebWriteCon, string strKeyValue)
        {
            
            
        }


    }

}
